package ltd.dujiabao.eduservice.entity.chapter;

import lombok.Data;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;


/**
 * @author : DuJiabao
 * @Project : online-course-project
 * @Time : 2021/4/21 23:39
 * @Desc :
 */
@Data
@Accessors(chain = true)
public class ChapterVo {
  private String id;
  private String title;
  private List<VideoVo> children = new ArrayList<>();

  public ChapterVo() {
  }

  public ChapterVo(String id, String title) {
    this.id = id;
    this.title = title;
  }

  public ChapterVo addChild(VideoVo videoVo) {
    children.add(videoVo);
    return this;
  }
}
